home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / CMPLTPAS / ROOTER2.PAS < prev    next >
Pascal/Delphi Source File  |  1986-01-18  |  512b  |  23 lines

  1. PROGRAM BetterRooter;
  2.  
  3. VAR 
  4.   R,S : Real;
  5.  
  6. BEGIN
  7.   Writeln('>>Better square root calculator<<');
  8.   Writeln;
  9.   R:=1;
  10.   WHILE R<>0 DO
  11.     BEGIN
  12.       Writeln('>>Enter the number (0 to exit): ');
  13.       Readln(R);
  14.       IF R<>0 THEN       
  15.       BEGIN
  16.         S := Sqrt(R);
  17.         Writeln('  The square root of ',R:7:7,' is ',S:7:7,'.');
  18.         Writeln
  19.       END
  20.     END;
  21.   Writeln('>>Square root calculator signing off...')
  22. END.
  23.